]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st: Don't leak st_describe_actor strings
authorDaniel van Vugt <daniel.van.vugt@canonical.com>
Wed, 17 Jun 2020 09:31:59 +0000 (17:31 +0800)
committerDaniel van Vugt <daniel.van.vugt@canonical.com>
Thu, 18 Jun 2020 06:10:59 +0000 (14:10 +0800)
Hopefully this code doesn't get hit much. And it does seem to be the
only user of the function.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1319

src/st/st-widget.c

index 615d5e477205bc772997ee27a57029f39d5ea799..9efffbd762f9214be9337dfa9e37cd75f70f5bf9 100644 (file)
@@ -601,8 +601,11 @@ st_widget_get_theme_node (StWidget *widget)
 
       if (stage == NULL)
         {
+          g_autofree char *desc = st_describe_actor (CLUTTER_ACTOR (widget));
+
           g_critical ("st_widget_get_theme_node called on the widget %s which is not in the stage.",
-                      st_describe_actor (CLUTTER_ACTOR (widget)));
+                      desc);
+
           return g_object_new (ST_TYPE_THEME_NODE, NULL);
         }